<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>使用JS+CSS实现折叠面板效果</title>

  <style>
    html, body {
      width: 100%;
      height: 100%;
      padding: 0;
      margin: 0;
      background: #eff2f5;
    }

    .demo-block__title {
      margin: 0;
      padding: 32px 16px 16px;
      color: #969799;
      font-size: 14px;
      font-weight: 400;
      line-height: 16px;
    }

    .collapse-item {
      position: relative;
    }
  </style>
</head>
<body>
  <div class="demo-block">
    <div class="demo-block__title">折叠面板</div>
    <div class="collapse">
      <div class="collapse-item">
        <div class="collapse-item__title">
          <div class="title">
            <span>标题1</span>
          </div>
        </div>
        <div class="collapse-item__wrapper">
          内容
        </div>
      </div>
    </div>
  </div>
</body>
</html>